﻿
using DLL.NET50.DB.MS.DrugBackup.Context;
using DLL.NET50.DB.MS.Entity;
using DLL.NET50.JSON;
using Microsoft.EntityFrameworkCore;
using System;

namespace DLL.NET50.DB.MS.CopyDrugs.Context
{

    public class CMSCopyDrugsContext : CMSSaveDrugsContext
    {
        public CMSCopyDrugsContext(DbContextOptions<CMSSaveDrugsContext> options)
         : base(options)
        {

        }
        protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
        {
            if (!optionsBuilder.IsConfigured)
            {
                string efCopyStr = AppConfigurtaionServices.Configuration.GetSection("ConnectionStrings").GetSection("EFCopyStr").Value; 
                optionsBuilder.UseMySQL(efCopyStr);

            }
        }
    }
}
